package com.newhope.trade.getway.integration;

import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.cloud.netflix.zuul.EnableZuulProxy;
import org.springframework.context.annotation.Bean;

import com.newhope.trade.getway.integration.filter.AuthFilter;

@SpringBootApplication
@EnableZuulProxy
@EnableDiscoveryClient
@RefreshScope
public class BootStrap  {
    public static void main(String[] args) throws Exception {
        new SpringApplicationBuilder(BootStrap.class).web(true).run(args);
    }

    @Bean
    public AuthFilter thirdServiceFilter() {
        return new AuthFilter();
    }
}
